package cn.study.executorService;

import java.util.concurrent.*;

/**
 * 作者：跟 大佳一起 学
 */
public class ThreadPoolTest {
    public static void main(String[] args) throws InterruptedException {

        ThreadPoolExecutor executor = new ThreadPoolExecutor(5, 10,
                30, TimeUnit.SECONDS, new LinkedBlockingQueue<>(5));
        executor.execute(new Runnable() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName());
            }
        });

//        executor.shutdown();
//        executor.shutdownNow();

    }
}
